package inference;

import java.util.ArrayList;

import matchbox.NodeNames;
import probability.GaussianDistribution;
import probability.Indicator;

public class GraphUtils {

	public static int getIndexInEdge(GraphEdge edge, GraphNode node) {
		for (int i = 0; i < edge.nodes().size(); i++) {
			if (edge.nodes().get(i) == node) {
				return i;
			}
		}
		return -1;
	}

//	private BeliefMessage trueSkillBackwardDistribute(GraphNode next, GraphEdge forwardIncoming, GaussianDistribution backwardDist) {
//		BeliefMessage m;
//		int idx = getIndexInEdge(forwardIncoming, next);
//
//		ArrayList<GaussianDistribution> gd = new ArrayList<GaussianDistribution>();
//		for (int i = 0; i < _zdistributions.size(); i++) {
//			gd.add(Indicator.trueSkillBackwardEqualSum(i, incomingDists, _toz,
//					backwardDist, outgoingM));
//		}
//		_toz = gd;
//		_forward = false;
//
//		m = new BeliefMessage(_toz.get(idx));
//		return m;
//	}

}
